<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的询价详情 - 模切材料小管家</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            /* TDesign 工业品色彩系统 */
            --primary-color: #0052d9;
            --primary-light: #266fe8;
            --primary-dark: #003cab;
            --secondary-color: #f2f3ff;
            --accent-color: #e37318;
            --success-color: #00a870;
            --warning-color: #ed7b2f;
            --error-color: #d54941;
            
            /* 背景色系 */
            --bg-color-page: #f5f7fa;
            --bg-color-container: #ffffff;
            --bg-color-secondray: #f8f9fc;
            
            /* 边框和分割线 */
            --border-color: #e7e7e7;
            --border-color-light: #f0f0f0;
            --border-radius-small: 3px;
            --border-radius-medium: 6px;
            --border-radius-large: 9px;
            
            /* 文字色彩 */
            --text-primary: #1a1a1a;
            --text-secondary: #4e5969;
            --text-placeholder: #86909c;
            --text-disabled: #c9cdd4;
            
            /* 阴影系统 */
            --shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-2: 0 1px 4px 0 rgba(0, 0, 0, 0.08);
            --shadow-3: 0 4px 8px 0 rgba(0, 0, 0, 0.12);
            
            /* 间距系统 */
            --space-1: 4px;
            --space-2: 8px;
            --space-3: 12px;
            --space-4: 16px;
            --space-5: 20px;
            --space-6: 24px;
            --space-8: 32px;
            --space-10: 40px;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }
        
        body {
            background-color: var(--bg-color-page);
            color: var(--text-primary);
            font-size: 14px;
            line-height: 1.5;
            padding-bottom: 120px;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        
        .container {
            max-width: 480px;
            margin: 0 auto;
            background: var(--bg-color-container);
            min-height: 100vh;
            box-shadow: var(--shadow-1);
            position: relative;
            overflow-x: hidden;
        }
        
        /* 头部样式 - TDesign 简约风格 */
        .header {
            background: var(--primary-color);
            color: white;
            padding: var(--space-4) var(--space-4) var(--space-5);
            position: relative;
            z-index: 10;
        }
        
        .top-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: var(--space-4);
        }
        
        .back-btn {
            font-size: 18px;
            cursor: pointer;
            opacity: 0.9;
            transition: opacity 0.2s ease;
        }
        
        .back-btn:hover {
            opacity: 1;
        }
        
        .page-title {
            font-weight: 500;
            font-size: 16px;
        }
        
        .actions {
            display: flex;
            gap: var(--space-5);
        }
        
        .actions i {
            font-size: 16px;
            cursor: pointer;
            opacity: 0.9;
            transition: opacity 0.2s ease;
        }
        
        .actions i:hover {
            opacity: 1;
        }
        
        .favorite-btn,
        .report-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            cursor: pointer;
            opacity: 0.9;
            transition: opacity 0.2s ease;
        }
        
        .favorite-btn:hover,
        .report-btn:hover {
            opacity: 1;
        }
        
        .favorite-btn i,
        .report-btn i {
            font-size: 14px;
        }
        
        .favorite-btn span,
        .report-btn span {
            font-size: 10px;
        }
        
        /* 参考group-detail.html的布局样式 */
        .group-info {
            padding: var(--space-4);
        }
        
        .info-section {
            background: var(--bg-color-container);
            border-radius: var(--border-radius-medium);
            margin-bottom: var(--space-4);
            box-shadow: var(--shadow-1);
            overflow: hidden;
            border: 1px solid var(--border-color-light);
        }
        
        .section-header {
            padding: var(--space-4);
            border-bottom: 1px solid var(--border-color-light);
            background: var(--bg-color-secondray);
        }
        
        .section-title {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-primary);
            display: flex;
            align-items: center;
        }
        
        .section-title i {
            margin-right: var(--space-2);
            color: var(--primary-color);
            font-size: 14px;
        }
        
        .section-content {
            padding: var(--space-4);
        }
        
        .info-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: var(--space-4);
            margin-bottom: var(--space-4);
        }
        
        .info-item {
            display: flex;
            flex-direction: column;
        }
        
        .info-label {
            color: var(--text-placeholder);
            font-size: 12px;
            margin-bottom: var(--space-1);
        }
        
        .info-value {
            color: var(--text-primary);
            font-size: 14px;
            font-weight: 500;
        }
        
        /* 查看技术参数按钮 - TDesign 简约风格 */
        .tech-params-btn {
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: var(--border-radius-medium);
            padding: var(--space-2) var(--space-5);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-top: var(--space-2);
        }
        
        .tech-params-btn:hover {
            background: var(--primary-light);
        }
        
        /* 参与者区域 - TDesign 简约风格 */
        .participants-section {
            background: var(--bg-color-container);
            border-radius: var(--border-radius-medium);
            margin: 0 0 var(--space-6);
            box-shadow: var(--shadow-1);
            overflow: hidden;
            border: 1px solid var(--border-color-light);
        }
        
        .participants-header {
            padding: var(--space-4);
            border-bottom: 1px solid var(--border-color-light);
            background: var(--bg-color-secondray);
        }
        
        .participants-title {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-primary);
            display: flex;
            align-items: center;
        }
        
        .participants-title i {
            margin-right: var(--space-2);
            color: var(--primary-color);
            font-size: 14px;
        }
        
        .participants-badge {
            background: var(--accent-color);
            color: white;
            font-size: 10px;
            padding: var(--space-1) var(--space-2);
            border-radius: var(--border-radius-small);
            margin-left: var(--space-2);
        }
        
        .participants-content {
            padding: var(--space-4);
            max-height: 300px;
            overflow-y: auto;
        }
        
        .participant-item {
            display: flex;
            align-items: center;
            padding: var(--space-2) 0;
            border-bottom: 1px solid var(--border-color-light);
        }
        
        .participant-item:last-child {
            border-bottom: none;
        }
        
        /* 高亮自己询价的样式 */
        .participant-item.my-order {
            background: linear-gradient(90deg, #fff9e6 0%, #ffffff 100%);
            border-left: 3px solid var(--warning-color);
            padding-left: var(--space-3);
            margin-left: calc(-1 * var(--space-4));
            padding-right: var(--space-3);
            margin-right: calc(-1 * var(--space-4));
            border-radius: var(--border-radius-small);
        }
        
        .participant-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--primary-color);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 500;
            font-size: 12px;
            margin-right: var(--space-2);
            flex-shrink: 0;
        }
        
        .participant-item.my-order .participant-avatar {
            background: var(--warning-color);
        }
        
        .participant-info {
            flex: 1;
            min-width: 0;
        }
        
        .participant-name {
            font-size: 12px;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: var(--space-1);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .participant-details {
            font-size: 11px;
            color: var(--text-placeholder);
            line-height: 1.3;
        }
        
        /* 明文显示联系信息 */
        .participant-item.my-order .participant-details {
            color: var(--text-secondary);
            font-weight: 500;
        }
        
        .participant-time {
            font-size: 10px;
            color: var(--text-placeholder);
            text-align: right;
            min-width: 80px;
        }
        
        .initiator-tag {
            background: var(--warning-color);
            color: white;
            font-size: 8px;
            padding: 2px 4px;
            border-radius: var(--border-radius-small);
            margin-left: var(--space-1);
            font-weight: 500;
        }
        
        .my-tag {
            background: var(--success-color);
            color: white;
            font-size: 8px;
            padding: 2px 4px;
            border-radius: var(--border-radius-small);
            margin-left: var(--space-1);
            font-weight: 500;
        }
        
        /* 底部操作栏 */
        .bottom-actions {
            position: fixed;
            bottom: 64px;
            left: 0;
            right: 0;
            background: var(--bg-color-container);
            padding: var(--space-4);
            border-top: 1px solid var(--border-color-light);
            display: flex;
            gap: var(--space-2);
            z-index: 100;
            max-width: 480px;
            margin: 0 auto;
        }
        
        .btn {
            flex: 1;
            padding: var(--space-3);
            border: none;
            border-radius: var(--border-radius-medium);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .btn-secondary {
            background: var(--bg-color-secondray);
            color: var(--text-secondary);
            border: 1px solid var(--border-color-light);
        }
        
        .btn-secondary:hover {
            background: var(--border-color-light);
        }
        
        .btn-primary {
            background: var(--primary-color);
            color: white;
        }
        
        .btn-primary:hover {
            background: var(--primary-dark);
        }
        
        /* 底部导航栏 - TDesign 简约风格 */
        .tabbar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--bg-color-container);
            border-top: 1px solid var(--border-color);
            display: flex;
            z-index: 100;
            max-width: 480px;
            margin: 0 auto;
            height: 64px;
        }
        
        .tab-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: var(--space-2) 0;
            cursor: pointer;
            transition: color 0.2s ease;
            color: var(--text-placeholder);
        }
        
        .tab-item.active {
            color: var(--primary-color);
        }
        
        .tab-item:hover {
            color: var(--primary-light);
        }
        
        .tab-item i {
            font-size: 18px;
            margin-bottom: var(--space-1);
        }
        
        .tab-item span {
            font-size: 10px;
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 头部区域 -->
        <div class="header">
            <div class="top-bar">
                <div class="back-btn" onclick="history.back()">
                    <i class="fas fa-arrow-left"></i>
                </div>
                <div class="page-title">我的询价详情</div>
                <div class="actions">
                    <div class="favorite-btn" onclick="toggleFavorite()">
                        <i class="fas fa-heart"></i>
                        <span>收藏</span>
                    </div>
                    <div class="report-btn" onclick="reportDemand()">
                        <i class="fas fa-flag"></i>
                        <span>举报</span>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 求购信息 -->
        <div class="group-info">
            
            <!-- 内容信息 -->
            <div class="info-section">
                <div class="section-header">
                    <div class="section-title">
                        <i class="fas fa-info-circle"></i>
                        <span>内容信息</span>
                    </div>
                </div>
                <div class="section-content">
                    <div class="info-grid">
                        <div class="info-item">
                            <div class="info-label">产品类别:</div>
                            <div class="info-value" id="demandCategory">材料</div>
                        </div>
                        <div class="info-item">
                            <div class="info-label">产品名称:</div>
                            <div class="info-value" id="productName">BOPP单面胶带</div>
                        </div>
                        <div class="info-item">
                            <div class="info-label">产品型号:</div>
                            <div class="info-value" id="productModel">MT-5015</div>
                        </div>
                        <div class="info-item">
                            <div class="info-label">所在地:</div>
                            <div class="info-value" id="demandLocation">浙江省杭州市余杭区</div>
                        </div>
                        <div class="info-item">
                            <div class="info-label">联系人:</div>
                            <div class="info-value" id="contactName">张经理</div>
                        </div>
                    </div>
                    
                    <div class="info-item" style="grid-column: 1 / -1;">
                        <div class="info-label">要求:</div>
                        <div class="info-value" id="demandRequirements">需要高品质BOPP单面胶带，用于包装行业。要求粘性强、耐候性好，包装规格50mm宽度，长度50m/卷。需要提供质量证书，支持月结付款，交期20天内。</div>
                    </div>
                    
                    <button class="tech-params-btn" onclick="viewTechParams()">
                        <i class="fas fa-file-alt"></i> 查看技术参数
                    </button>
            </div>
                    </div>
        
            <!-- 询价区域 -->
        <div class="participants-section">
            <div class="participants-header">
                <div class="participants-title">
                    <i class="fas fa-users"></i>
                    <span>询价</span>
                        <span class="participants-badge" id="orderCount">6</span>
                </div>
            </div>
            <div class="participants-content">
                <div class="participant-item">
                        <div class="participant-avatar">李</div>
                    <div class="participant-info">
                            <div class="participant-name">
                                鑫源材料厂 李***
                                <span class="initiator-tag">新</span>
                    </div>
                            <div class="participant-details">联系电话: 138****8000</div>
                        </div>
                        <div class="participant-time">2024-01-18 10:00</div>
                </div>
                
                <!-- 高亮显示自己的询价 -->
                <div class="participant-item my-order">
                        <div class="participant-avatar">王</div>
                    <div class="participant-info">
                            <div class="participant-name">
                                苏州胶带制造有限公司 王明华
                                <span class="my-tag">我的询价</span>
                            </div>
                            <div class="participant-details">联系电话: 13912349999 | 苏州胶带制造有限公司</div>
                    </div>
                        <div class="participant-time">2024-01-17 14:30</div>
            </div>
            
                <div class="participant-item">
                        <div class="participant-avatar">陈</div>
                    <div class="participant-info">
                            <div class="participant-name">东莞材料科技有限公司 陈***</div>
                            <div class="participant-details">联系电话: 137****7777</div>
                    </div>
                        <div class="participant-time">2024-01-16 09:15</div>
                </div>
                
                <div class="participant-item">
                        <div class="participant-avatar">刘</div>
                    <div class="participant-info">
                            <div class="participant-name">深圳新材料有限公司 刘***</div>
                            <div class="participant-details">联系电话: 189****6666</div>
                    </div>
                        <div class="participant-time">2024-01-15 16:20</div>
            </div>
            
                <div class="participant-item">
                        <div class="participant-avatar">周</div>
                    <div class="participant-info">
                            <div class="participant-name">宁波工业材料厂 周***</div>
                            <div class="participant-details">联系电话: 156****5555</div>
                    </div>
                        <div class="participant-time">2024-01-14 11:45</div>
                </div>
                
                <div class="participant-item">
                        <div class="participant-avatar">吴</div>
                    <div class="participant-info">
                            <div class="participant-name">广州胶粘制品厂 吴***</div>
                            <div class="participant-details">联系电话: 158****4444</div>
                    </div>
                        <div class="participant-time">2024-01-13 13:30</div>
                </div>
            </div>
            
            </div>
        </div>
        
        <!-- 底部操作栏 -->
        <div class="bottom-actions">
            <button class="btn btn-secondary" onclick="contactDemander()">
                <i class="fas fa-phone"></i>
                联系求购方
            </button>
            <button class="btn btn-primary" onclick="submitQuote()">
                <i class="fas fa-paper-plane"></i>
                提交询价
            </button>
        </div>
        
        <!-- 底部导航 -->
        <div class="tabbar">
            <div class="tab-item" onclick="location.href='home.html'">
                <i class="fas fa-home"></i>
                <span>首页</span>
            </div>
            <div class="tab-item" onclick="location.href='demand-list.html'">
                <i class="fas fa-search"></i>
                <span>求购</span>
            </div>
            <div class="tab-item" onclick="location.href='publish-select.html'">
                <i class="fas fa-plus-circle"></i>
                <span>发布</span>
            </div>
            <div class="tab-item" onclick="location.href='consultation.html'">
                <i class="fas fa-comments"></i>
                <span>客服</span>
            </div>
            <div class="tab-item" onclick="location.href='profile.html'">
                <i class="fas fa-user"></i>
                <span>我的</span>
            </div>
        </div>
    </div>
    
    <script>
        // 举报求购
        function reportDemand() {
            const reasons = ['虚假信息', '价格欺诈', '侵犯版权', '违法内容', '其他'];
            let reasonsText = reasons.map((reason, index) => `${index + 1}. ${reason}`).join('\n');
            
            const selectedReason = prompt(`请选择举报原因：\n${reasonsText}\n\n请输入对应数字(1-5):`);
            
            if (selectedReason && selectedReason >= 1 && selectedReason <= 5) {
                const reason = reasons[selectedReason - 1];
                if (confirm(`确定要举报该求购吗？\n举报原因：${reason}`)) {
                    alert('举报已提交，我们会尽快处理，感谢您的反馈！');
                }
            }
        }
        
        // 分享求购
        function shareDemand() {
            if (navigator.share) {
                navigator.share({
                    title: '求购信息分享',
                    text: '查看这个求购信息',
                    url: window.location.href
                });
            } else {
                navigator.clipboard.writeText(window.location.href).then(() => {
                    alert('求购链接已复制到剪贴板');
                });
            }
        }
        
        // 切换收藏
        function toggleFavorite() {
            const heartIcon = document.querySelector('.fa-heart');
            if (heartIcon.classList.contains('fas')) {
                heartIcon.classList.remove('fas');
                heartIcon.classList.add('far');
                heartIcon.style.color = '';
            } else {
                heartIcon.classList.remove('far');
                heartIcon.classList.add('fas');
                heartIcon.style.color = 'var(--error-color)';
            }
        }
        
        // 联系求购方
        function contactDemander() {
            alert('正在联系求购方...');
        }
        
        // 提交询价
        function submitQuote() {
            if (confirm('确定要提交询价吗？')) {
                alert('询价已提交，求购方将尽快回复！');
            }
        }
        
        // 模拟求购数据
        const demandData = {
            1: {
                category: '材料',
                productName: 'BOPP单面胶带',
                model: 'MT-5015',
                location: '浙江省杭州市余杭区',
                contactName: '张经理',
                requirements: '需要高品质BOPP单面胶带，用于包装行业。要求粘性强、耐候性好，包装规格50mm宽度，长度50m/卷。需要提供质量证书，支持月结付款，交期20天内。',
                contactPhone: '138****8000',
                contactEmail: 'zhang@example.com'
            },
            2: {
                category: '材料',
                productName: 'PET保护膜',
                model: 'PET-001',
                location: '广东省深圳市南山区',
                contactName: '李经理',
                requirements: '需要高透明度PET保护膜，用于电子产品屏幕保护。要求低雾度、易撕除，规格100mm宽度，厚度0.1mm。需要环保认证，现款现货。',
                contactPhone: '139****9999',
                contactEmail: 'li@example.com'
            }
        };
        
        // 加载求购数据
        function loadDemandData() {
            const urlParams = new URLSearchParams(window.location.search);
            const demandId = urlParams.get('id') || '1';
            
            if (demandData[demandId]) {
                const demand = demandData[demandId];
                
                // 更新页面内容
                document.getElementById('demandCategory').textContent = demand.category;
                document.getElementById('productName').textContent = demand.productName;
                document.getElementById('productModel').textContent = demand.model;
                document.getElementById('demandLocation').textContent = demand.location;
                document.getElementById('contactName').textContent = demand.contactName;
                document.getElementById('demandRequirements').textContent = demand.requirements;
            }
        }
        
        // 分享求购
        function shareDemand() {
            if (navigator.share) {
                navigator.share({
                    title: document.getElementById('productName').textContent,
                    text: document.getElementById('demandRequirements').textContent,
                    url: window.location.href
                });
            } else {
                navigator.clipboard.writeText(window.location.href).then(() => {
                    alert('求购链接已复制到剪贴板');
                });
            }
        }
        
        // 切换收藏
        function toggleFavorite() {
            const heartIcon = document.querySelector('.fa-heart');
            if (heartIcon.classList.contains('fas')) {
                heartIcon.classList.remove('fas');
                heartIcon.classList.add('far');
                heartIcon.style.color = '';
            } else {
                heartIcon.classList.remove('far');
                heartIcon.classList.add('fas');
                heartIcon.style.color = 'var(--error-color)';
            }
        }
        
        // 联系求购方
        function contactDemander() {
            const contactName = document.getElementById('contactName').textContent;
            alert(`正在联系求购方${contactName}...`);
        }
        
        // 提交询价
        function submitQuote() {
            const productName = document.getElementById('productName').textContent;
            
            if (confirm(`确定要对"${productName}"提交询价吗？`)) {
                alert('询价已提交，求购方将收到您的询价信息！');
            }
        }
        
        // 查看技术参数
        function viewTechParams() {
            alert('查看技术参数功能开发中...');
        }
        
        // 页面加载完成后初始化
        document.addEventListener('DOMContentLoaded', function() {
            loadDemandData();
        });
        
        // 底部导航切换
        document.querySelectorAll('.tab-item').forEach(item => {
            item.addEventListener('click', function() {
                document.querySelectorAll('.tab-item').forEach(t => t.classList.remove('active'));
                this.classList.add('active');
            });
        });
    </script>
</body>
</html>
